<div id="right">
      <h1>Cropping Plan</h1>
      <span class="postinfo">Posted by <a href="#">David</a> on 02.11.10</span>

<!--content-->

				<p>
                <select name="blockselector" id="blockselector" onchange="setBlock(this.value)">
                <?php foreach($allBlocks as $b): ?>
                    <?php if($b == $firstBlock): ?>
                        <option selected="selected" value="<?php echo $b['blockid']?>">
                    <?php else: ?>
                        <option value="<?php echo $b['blockid']?>">
                    <?php endif; ?>
                        <?php echo $b['blockname'] ?>
                        </option>
                <?php endforeach; ?>
                </select>
                </p>
                
    
                <br />		
                <INPUT TYPE=SUBMIT VALUE="View">
						
                <br/><br/><br/>
				
                <select name="cropselector" id="cropselector" onchange="setCropFromJavascript(this.value)">
                <?php foreach($allCrops as $c): ?>
                    <?php if($c['cropid'] == $firstCrop): ?>
                        <option selected="selected" value="<?php echo $c['cropid']?>">
                    <?php else: ?>
                        <option value="<?php echo $c['cropid']?>">
                    <?php endif; ?>
                        <?php echo $c['cropname'] ?>
                        </option>
                <?php endforeach; ?>
                </select>
                
                <input type="button" value="Save" onclick="savePlan()">
                
                <div id="tableDisplay">
                
                
                    <object type="application/x-java-applet;version=1.4.1"
                    width= "900" height= "500"  name="jsap" id="jsap">
                        <param name="code" value="croppingplanap.CroppingPlanAp">
                        <param name="mayscript" value="yes">
                        <param name="scriptable" value="true">
                        <?php
                        
                        echo "<param name=\"first_crop\" value=\"$firstCrop\">";
                        echo "<param name=\"all_categories\" value=\"$categoryNameString\">";
                        echo "<param name=\"all_crops\" value=\"$cropNameString\">";
                        echo "<param name=\"map_to_load\" value=\"$planString\">";
                
                        //echo "<param name=\"map_to_load\" value=\"$pyo\">";
                        ?>
                        <param name="name" value="jsapplet">
                    </object>

                  
</div>